<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>心悦网络-后台管理系统框架</title>

</head>
<body style="background: #f2f4f8;">
	<div th:replace="gm/common :: html"></div>
	<div align="center">

		<img alt="" src="/images/logo.jpg"
			style="width: 500px; heigh: 200px;">
		<h2>心悦网络(<a href="http://www.xinyues.com">xinyues.com</a>)-后台管理管理框架</h2>
		<hr>
		<div id="horizontal-form">
			<table style="border-collapse: separate; border-spacing: 0px 10px;">
				<tr>
					<td><span id="errorTips" style="color: red"></span></td>
				</tr>
				<tr>
					<td>账号： <input class="easyui-textbox" prompt="Username"
						id="username" iconWidth="28" style="width: 250px;">
					</td>
				</tr>

				<tr>
					<td>密码： <input class="easyui-passwordbox" prompt="Password"
						id="password" iconWidth="28" style="width: 250px;">
					</td>
				</tr>
				<tr align="center">
					<td><a href="javascript:void(0)" class="easyui-linkbutton"
						onclick="submitForm()">--立即登陆--</a></td>
				</tr>
			</table>

		</div>
	</div>
</body>
<script type="text/javascript">
	//解决iframe下系统超时无法跳出iframe框架的问题
	if (top.location !== self.location) {
		top.location.href = self.location.href;
	}
	function submitForm() {
		$("#errorTips").html("");
		var username = $("#username").val();
		var password = $("#password").val();
		var url = "/account/login";
		var json = {
			"username" : username,
			"password" : password
		};
		postAjax(url, json, function(data) {
			if (data.code == 0) {
				window.location.href = "/layout/toMain";
			} else {
				$("#errorTips").html(data.msg);
			}
		});
	}
</script>
</html>